﻿@using Apps.Web.Core;
@using Apps.Locale;
@using Apps.Models.Enum;
@using Apps.Models
@using Apps.Models.PUB;
@{
    ViewBag.Title = "Main";
    Layout = "~/Views/Shared/_Index_Layout.cshtml";
    var data = (RPT_LMS_RZC)Model;

    var lmsIndexList = (List<PUB_LMS_INDEXModel>)ViewBag.LmsIndex;
}
<script src="@Url.Content("~/Scripts/echarts.min.js")"></script>
<script src="@Url.Content("~/Scripts/echarts.theme.shine.js")"></script>

<link href="~/Content/bootstrap.min.css" rel="stylesheet" />
<link href="~/Content/AdminLTE/AdminLTE.min.css" rel="stylesheet" />
<style>
    body {font-size:13px;font-family:'Microsoft YaHei' !important}
    h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {font-family:'Microsoft YaHei' !important}
    .box-body {min-height:190px;}
    .box-header>.fa, .box-header>.glyphicon, .box-header>.ion, .box-header .box-title {font-size: 14px;}
    .label {line-height:2px; padding:1px;}

    .box-header{padding:3px 0 3px 0;}
    .box{margin-bottom:5px; border-top: 2px solid #d2d6de;}
    .box-body{min-height:172px;}
</style>
<div id="container">
   
<div class="row">
    


    <div class="col-sm-12">
        @*唐山中润质检中心三级编码管理系统*@
    </div>
    @*双欣*@
    <div class="col-sm-6">
        
    </div>
    <div class="col-sm-6">
        
    </div>   
    @*双欣*@
    @*新力*@
    @*<div class="col-sm-6">
        <div class="box box-default">
            <div class="box-header with-border">
                <h3 class="box-title">&nbsp;入厂煤质趋势图</h3>
            </div><!-- /.box-header -->
            <div class="box-body" id="notePartContent" style="height:280px;">
                <select id="ddlYear3" style="width:80px;">
                    @for (int idx = 0; idx < 5; idx++)
                    {
                        if (idx == 0)
                        {
                            <option value="@DateTime.Now.AddYears(0 - idx).Year" selected="selected">@DateTime.Now.AddYears(0 - idx).ToString("yyyy年")</option>
                        }
                        else
                        {
                            <option value="@DateTime.Now.AddYears(0 - idx).Year">@DateTime.Now.AddYears(0 - idx).ToString("yyyy年")</option>
                        }
                    }
                </select>
                <select id="ddlMZType" style="width:240px;">
                    @for (var idx = 0; idx < lmsIndexList.Count; idx++)
                    {
                        if (idx == 0)
                        {
                            <option value="@lmsIndexList[idx].INDEX_ID" selected="selected">@(lmsIndexList[idx].INDEX_NAME)(@(lmsIndexList[idx].INDEX_DISNAME))</option>
                        }
                        else
                        {
                            <option value="@lmsIndexList[idx].INDEX_ID">@(lmsIndexList[idx].INDEX_NAME)(@(lmsIndexList[idx].INDEX_DISNAME))</option>
                        }
                    }
                </select>
                <script type="text/javascript">
                    $(function () {
                        $("#ddlMZType").change(function () {
                            QueryLineStack();
                        });

                        $("#ddlYear3").change(function () {
                            QueryLineStack();
                        });
                        QueryLineStack();
                    })

                    function QueryLineStack() {
                        $("#ifLineStack").attr("src", "@Url.Action("LineStack", "Home")?MZType=" + $("#ddlMZType").val()
                            + "&QueryYear=" + $("#ddlYear3").val());
                    }
                </script>
                <iframe id="ifLineStack" src="" style="width:100%; height:260px;" frameborder="0"></iframe>
            </div><!-- /.box-body -->
        </div><!-- /.box -->
    </div>
    <div class="col-sm-6">
        <div class="box box-default">
            <div class="box-header with-border">
                <h3 class="box-title">&nbsp;热值差统计</h3>
            </div><!-- /.box-header -->
            <div class="box-body" id="myFinishFlowPartContent" style="padding-bottom:0px; padding-left:0px; padding-right:0px; padding-top:10px;height:280px;">
                <table style="width:100%;margin:55px 0px 55px 0px">
                    <tr>
                        <td style="width:25%;">
                            <iframe id="CALORIFIC_YEAR_RC" src="@Url.Action("Gauge","Home")?title=入厂年平均热值(MJ/kg)&value=@data.QNET_RC&min=0&max=30" style="width:100%; height:160px;" frameborder="0"></iframe>
                        </td>
                        <td style="width:25%;">
                            <iframe id="CALORIFIC_YEAR_RL" src="@Url.Action("Gauge","Home")?title=入炉年平均热值(MJ/kg)&value=@data.QNET_RL&min=0&max=30" style="width:100%; height:160px;" frameborder="0"></iframe>
                        </td>
                        <td style="width:25%;">
                            <iframe id="DIFFERENCE_YEAR" src="@Url.Action("Gauge","Home")?title=年热值差(KJ/kg)&value=@data.CZ_YEAR&min=-1500&max=1500" style="width:100%; height:160px;" frameborder="0"></iframe>
                        </td>
                        <td>
                            <iframe id="DIFFERENCE_MONTH" src="@Url.Action("Gauge","Home")?title=月热值差(KJ/kg)&value=@data.CZ_MONTH&min=-1500&max=1500" style="width:100%; height:160px;" frameborder="0"></iframe>
                        </td>
                    </tr>
                </table>
                <script type="text/javascript">
                    var rnd = 0;
                    var LoadSuccessCount = 0;
                    function CanLoadGaugeData() {
                        //LoadSuccessCount += 1;

                        //if (LoadSuccessCount == 4) {
                        //    setTimeout(LoadGaugeData, 1000);
                        //}
                    }

                    function LoadGaugeData() {
                        rnd += 1;
                        $.ajax({
                            url: '@Url.Action("QueryCALORIFIC")',
                            type: "Get",
                            dataType: "json",
                            success: function (data) {
                                document.getElementById("CALORIFIC_YEAR_RC").contentWindow.ReloadGaugeValue(data.QNET_RC);
                                document.getElementById("CALORIFIC_YEAR_RL").contentWindow.ReloadGaugeValue(data.QNET_RL);
                                document.getElementById("DIFFERENCE_YEAR").contentWindow.ReloadGaugeValue(data.CZ_YEAR);
                                document.getElementById("DIFFERENCE_MONTH").contentWindow.ReloadGaugeValue(data.CZ_MONTH);

                                //setTimeout(LoadGaugeData, 500);
                            }
                        });
                    }
                </script>
            </div><!-- /.box-body -->
        </div><!-- /.box -->
    </div>*@    
    @*新力*@
</div>
</div>
<div id="modalwindow" class="easyui-window" style="width:800px; height:400px;" data-options="modal:false,closed:true,minimizable:false,shadow:false"></div>
